<template>
    <div>
          <h1>vue语法 指令</h1>
          <table class="table table-bordered">
            <tbody>
            <tr>
                <td>账号</td>
                <td><input type="text" v-model="info.userName"/></td>
            </tr>
            <tr>
                <td>密码</td>
                <td><input type="password" v-model="info.userPwd"/></td>
            </tr>
              <tr>
                <td></td>
                <td><input type="button" value="登录" class="btn btn-success" @click="login"/></td>
            </tr>
            
          </tbody>
          </table>
          
    </div>
</template>

<script setup lang="ts">
import {ref,reactive} from 'vue'
//v-model 双向绑定 数据变了 视图变 一般用于绑定获取表单的值
let info:any=ref({
    userName:'',//存账号
    userPwd:''//存密码
})
const login=()=>{
console.log(info.value)



}
</script>

<style scoped>

</style>